<div class="pagelist-block">

	<!-- 查询信息 START -->
	{include file="_pagelist_info.tpl"}
	<!-- 查询信息 END -->

	<form id="_pagelist_{$pagelist.guid}" action="?" method="get">

		{foreach key=name item=val from=$get}
		<input type="hidden" name="{$name}" value="{$val}" />
		{/foreach}
		<input type="hidden" name="pagecount" value="{$pagelist.pagecount}" />
		<!-- <input type="hidden" name="page" value="{$pagelist.page}" /> -->

		<!-- 页码列表 START -->
		{include file="_pagelist_single.tpl"}
		<!-- 页码列表 END -->
	</form>
</div>

<script type="text/javascript" language="JavaScript" charset="utf-8">
<!--
	var guid = $.trim('{$pagelist.guid}');
	var pagecount	= $.trim('{$pagelist.pagecount}');
	var curpage		= $.trim('{$pagelist.page}');

	{literal}
	jQuery(function($){
		$('div.pagelist').each(function(){
			var fm = $(this).parents('form');
			$(this).find('a').click(function(){
				var page = (($(this).attr('href')).split('#')).pop();
				fm.find('input[name="page"]').val(page);
				fm.trigger('submit');
				return false;
			});

			$(this).find('b.go').click(function(evt){
				var page = parseInt(fm.find('input[name="page"]').val());
				if(page == curpage){
					showmsg_right('当前就是第【'+page+'】页');
					evt.iscancelled = true;
					return false;
				}
				if(page > 0 && page <= pagecount){
					fm.trigger('submit');
				}
			});
		});
		
	});
	{/literal}
//-->
</script>